import request from '@/utils/request'

// 查询单位基础设施设备列表
export function listInfrastructure(query) {
  return request({
    url: '/warehouse/infrastructure/list',
    method: 'get',
    params: query
  })
}

// 查询单位基础设施设备详细
export function getInfrastructure(id) {
  return request({
    url: '/warehouse/infrastructure/' + id,
    method: 'get'
  })
}

// 新增单位基础设施设备
export function addInfrastructure(data) {
  return request({
    url: '/warehouse/infrastructure',
    method: 'post',
    data: data
  })
}

// 修改单位基础设施设备
export function updateInfrastructure(data) {
  return request({
    url: '/warehouse/infrastructure',
    method: 'put',
    data: data
  })
}

// 删除单位基础设施设备
export function delInfrastructure(id) {
  return request({
    url: '/warehouse/infrastructure/' + id,
    method: 'delete'
  })
}
